package com.neuedu.weatherapi.controller;
import com.neuedu.weatherapi.pojo.WeatherQualityIndex;
import com.neuedu.weatherapi.service.WeatherQualityIndexService;
import com.neuedu.weatherapi.util.ResponseBody;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@RestController
public class WeatherQualityIndexController {
    @Autowired
    private WeatherQualityIndexService weatherQualityIndexService;
    @GetMapping("/queryAllWeatherQualityIndex")
    public ResponseBody<List<WeatherQualityIndex>> queryAllWeatherQualityIndex(){
        List<WeatherQualityIndex> weatherQualityIndices=weatherQualityIndexService.queryAllWeatherQualityIndex();
        ResponseBody responseBody=new ResponseBody("200","成功",weatherQualityIndices);
        return responseBody;
    }
}
